package com.lesama.print;

/*
    PrintWriter字符打印流
        public PrintWriter(OutputStream os) 打印流直接通向字节输出流管道
        public PrintWriter(Writer w) 打印流直接通向字节输出流管道
        public PrintWriter(File f, String csn) 打印流直接通向文件对象
        public PrintWriter(String filepath, String csn) 打印流直接通向文件路径

        public void print\println(XXX xx) 打印任意类型数据出去
 */

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;

public class PrintWriterDemo1 {
    public static void main(String[] args) throws FileNotFoundException {
        PrintWriter pw = new PrintWriter(new FileOutputStream("day14\\d.txt", true), true);
        pw.println("紬"); // 只有println支持自动刷新, print和write不支持
        pw.print("鸥");
        pw.write("苍");
    }
}